#pragma once
#include <wx/wx.h>
#include <wx/filename.h>
#include <wx/ffile.h>
#include "cfgmgr.h"
#include "common.h"

class LogManager {
    public:
        LogManager();
        virtual ~LogManager() {
            delete _p_logfile;
        }
        
        virtual wxLogStderr* get_file_target();
        
        static LogManager& get(){
            if(_log_mgr==NULL) {
                _log_mgr = new LogManager();
            }
            
            return *_log_mgr;
        }
        
    protected:
        wxFFile* _p_logfile;
        
        static LogManager* _log_mgr;
};
